'use strict';

const Controller = require('egg').Controller;

class UserController extends Controller {
    async getUser() {
        const { ctx } = this;
        const userId = ctx.query.id;
        const user = await ctx.service.user.find(userId);
        ctx.body = ctx.response.sendJson({user});
    }
}

module.exports = UserController;
